package com.some;

import java.util.*;

public class Main8 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int p = Integer.MAX_VALUE;
        int[][] dp = new int[n + 1][7];
        dp[0][0] = 1;
        for (int i = 1; i <= n; i++) {
            dp[i][0] = (dp[i - 1][0] * 25 + dp[i - 1][1] * 24 + dp[i - 1][2] * 24) % p;
            dp[i][1] = (dp[i - 1][0] + dp[i - 1][1] + dp[i - 1][2]) % p;
            dp[i][2] = dp[i - 1][1];
            dp[i][3] = (dp[i - 1][2] + dp[i - 1][3] * 25 + dp[i - 1][4] * 24 + dp[i - 1][5] * 24) % p;
            dp[i][4] = (dp[i - 1][3] + dp[i - 1][4] + dp[i - 1][5]) % p;
            dp[i][5] = dp[i - 1][4];
            dp[i][6] = (dp[i - 1][5] + dp[i - 1][6] * 26) % p;
        }
        System.out.println(dp[n][6]);
    }

}